package jvm.loadclass;

/**
 * @author cyt
 * @create 2020-03-06 10:43
 */
public class Car {
    private Integer age;

    public static void main(String[] args) {
        Car car1 = new Car();
        Car car2 = new Car();
        Car car3 = new Car();

        System.out.println(car1.hashCode());
        System.out.println(car2.hashCode());
        System.out.println(car3.hashCode());

        Class<? extends Car> aClass1 = car1.getClass();
        Class<? extends Car> aClass2 = car2.getClass();
        System.out.println(aClass1.hashCode());
        System.out.println(aClass2.hashCode());

        // jdk.internal.loader.ClassLoaders$AppClassLoader@78308db1

        ClassLoader classLoader = aClass1.getClassLoader();

        // jdk.internal.loader.ClassLoaders$PlatformClassLoader@4f3f5b24

        ClassLoader parent = classLoader.getParent();

        ClassLoader parent1 = parent.getParent();
        System.out.println(parent);

        System.out.println(parent1);
        System.out.println(classLoader);
    }
}
